import { useStore } from "@/store/index";
import { Button } from "antd";
import { useEffect } from "react";
export default function TestDemo() {
  const { increment } = useStore();

  useEffect(() => {
    useStore.subscribe((state, preState) => {
      console.log("监听全部变化", state, preState);
    });
  }, []);
  return (
    <div>
      <h1>TestDemo</h1>
      <p>测试订阅</p>

      <Button onClick={() => increment()}>add</Button>
    </div>
  );
}
